package com.yonyou.cyxdms.sysAuth.service.feign;


import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cms.channel.client.dto.message.*;
import com.yonyou.cms.channel.client.entity.message.DealerAuthenticationDataDTO;
import com.yonyou.cms.channel.client.vo.message.DealerAttachVO;
import com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse;
import com.yonyou.cyxdms.basedata.client.domains.vo.RegionVO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * feign
 *
 * @author: renwd
 * @since: 2019/9/19
 * @version:1.0 Copyright: Copyright (c) 2018
 */

@FeignClient(name = "channel-service")
public interface CmsChannelCommonClient {


    /**
     * 根据省名字查询省信息
     * @param regionName 省名
     * @return String
     */
    @GetMapping("/region/getProvinceByNameLike")
    Map getProvinceByNameLike(@RequestParam("regionName") String regionName);


    /**
     * 根据城市名字And省id查询信息
     * @param cityName 市名
     * @param provinceId 省id
     * @return String
     */
    @GetMapping("/region/getCityByNameLike")
    String getCityByNameLike(@RequestParam("cityName") String cityName,
                             @RequestParam("provinceId") Long provinceId);

    @GetMapping("/region/getRegionById")
    public RestResultResponse<RegionVO> getRegionById(@RequestParam("regionId") Integer regionId);
}
